var salaryid;
$(function() {
	$("#form_core").height($(".form_tab").height()-$("#form_option").outerHeight());
	var query = getQueryString(window.location.toString());
	salaryid = query.salaryid;
	
	ajaxSubmitGet("/salary/searchSalary/" + salaryid, function(data) {
		//绑定数据
		bindValSalary(data);
	});
	
	$("#pageloading").hide();
});

function bindValSalary(data) {
    var salary_data = data['data'];
    //绑定主表数据
    $("#userCode").val(salary_data.userid);
    $("#sal_date").val(salary_data.sal_date);
    $("#baseSalary").val(salary_data.base_wage);
    $("#extraSalary").val(salary_data.allowance);
    $("#absenceSalary").val(salary_data.absence_deduct);
    $("#insurancSalary").val(salary_data.insurance);
    $("#attendanceDay").val(salary_data.attendance_day);
    $("#attenAbnormalDay").val(salary_data.atten_abnormal_day);
    $("#realSalary").val(salary_data.actual_salary);
}


//界面的返回处理，实际是关闭标签处理。
function toBack() {
    parent.tabManager.removeTabItem("mx_salary");
}